﻿<Window x:Class="LogicCircuit.DialogAbout"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:lc="clr-namespace:LogicCircuit"
	xmlns:properties="clr-namespace:LogicCircuit.Properties"
	WindowStartupLocation="CenterOwner"
	Title="{x:Static properties:Resources.TitleAbout}"
	Style="{StaticResource DialogFixedWindow}"
>
	<Window.Resources>
		<SolidColorBrush x:Key="dialogTextColor" Color="#FFE5A48E"/>
		<SolidColorBrush x:Key="dialogColor" Color="#FF36884A"/>

		<Style TargetType="TextBlock">
			<Setter Property="Foreground" Value="{StaticResource dialogTextColor}"/>
		</Style>

		<Style x:Key="BigText" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
			<Setter Property="FontSize" Value="16"/>
			<Setter Property="Margin" Value="3"/>
		</Style>

		<Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
			<Setter Property="Foreground" Value="{StaticResource dialogTextColor}"/>
			<Setter Property="HorizontalAlignment" Value="Center"/>
		</Style>
	</Window.Resources>

	<Grid Background="{StaticResource dialogColor}">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="*"/>
			<RowDefinition Height="*"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>

		<Grid Grid.Row="0">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto"/>
				<ColumnDefinition Width="*"/>
			</Grid.ColumnDefinitions>

			<Image Grid.Column="0" Name="image" Margin="32,20,16,20" Source="..\Properties\LogicCircuit.png"/>

			<Grid Grid.Column="1" MaxHeight="{Binding ElementName=image, Path=ActualHeight}" VerticalAlignment="Center">
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="Auto"/>
					<RowDefinition Height="*"/>
				</Grid.RowDefinitions>
				<TextBlock Grid.Row="0"
					Text="{x:Static properties:Resources.TitleApplication}" HorizontalAlignment="Left"
					FontSize="36" FontWeight="Bold" Margin="5,5,64,5"
				/>

				<TextBlock Grid.Row="1" Text="{x:Static properties:Resources.TitleCredits}" Style="{StaticResource BigText}"/>
				<WrapPanel Grid.Row="2" Orientation="Vertical" Margin="3">
					<WrapPanel.Resources>
						<Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
							<Setter Property="FlowDirection" Value="LeftToRight"/>
							<Setter Property="Margin" Value="3,0"/>
							<Setter Property="FontSize" Value="12"/>
							<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/>
						</Style>
					</WrapPanel.Resources>
					
					<TextBlock>Bruno Ramalhete</TextBlock>
					<TextBlock>Clayrton Henrique</TextBlock>
					<TextBlock>Daehyun Yang</TextBlock>
					<TextBlock>Daniela Becker</TextBlock>
					<TextBlock>David Chastant</TextBlock>
					<TextBlock>Dmitri Abramchaev</TextBlock>
					<TextBlock>Emanuele Pirro</TextBlock>
					<TextBlock>Eugene Lepekhin</TextBlock>
					<TextBlock>Fernando Perulles Aguilar</TextBlock>
					<TextBlock>Gábor Ruzsinszki</TextBlock>
					<TextBlock>Gé Brander</TextBlock>
					<TextBlock>Hans Kamphuis</TextBlock>
					<TextBlock>Jinshik Bae</TextBlock>
					<TextBlock>John Anderman</TextBlock>
					<TextBlock>Jongbin Han</TextBlock>
					<TextBlock>Junyoung Heo</TextBlock>
					<TextBlock>Karen Flores</TextBlock>
					<TextBlock>Konstantinas Birželis</TextBlock>
					<TextBlock>Kunihiko Ohnaka</TextBlock>
					<TextBlock>Lucas Balieiro Matos</TextBlock>
					<TextBlock>Markus Grundner</TextBlock>
					<TextBlock>Maxym Hylliaka</TextBlock>
					<TextBlock>Mohammad Mawaheb Seraj Eddin</TextBlock>
					<TextBlock>Natasha Pererezova</TextBlock>
					<TextBlock>Newton Carlos Will</TextBlock>
					<TextBlock>Panos Eracleous</TextBlock>
					<TextBlock>Sergey Dubinets</TextBlock>
					<TextBlock>Vitalii Dutka</TextBlock>
					<TextBlock>Wasilis Mandratzis</TextBlock>
					<TextBlock>Wenhua Shi</TextBlock>
				</WrapPanel>
			</Grid>
		</Grid>

		<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
			<TextBlock Text="{x:Static properties:Resources.TitleVersion}" Style="{StaticResource BigText}"/>
			<TextBlock Text="{Binding Path=Version}" Style="{StaticResource BigText}"/>
		</StackPanel>

		<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,16">
			<TextBlock Text="{x:Static properties:Resources.TitleWeb}" Style="{StaticResource BigText}"/>
			<TextBlock Style="{StaticResource BigText}">
				<Hyperlink Foreground="{StaticResource dialogTextColor}" NavigateUri="{Binding Source={x:Static properties:Resources.WebSiteUri}}">
					<Run Text="{x:Static properties:Resources.WebSiteUri}"/>
				</Hyperlink>
			</TextBlock>
		</StackPanel>

		<CheckBox Grid.Row="3" Content="{x:Static properties:Resources.TitleCheckVersionPeriodically}" IsChecked="{Binding Path=CheckVersionPeriodically}"/>

		<Grid Grid.Row="4">
			<Grid.Resources>
				<Style TargetType="TextBlock" BasedOn="{StaticResource BigText}">
					<Setter Property="HorizontalAlignment" Value="Center"/>
					<Setter Property="Margin" Value="30,0"/>
				</Style>
			</Grid.Resources>
			<TextBlock Name="latestVersion" Text="{x:Static properties:Resources.MessageVersionLatest}" Visibility="Hidden"/>
			<StackPanel Name="outdatedVersion" Orientation="Vertical" Visibility="Hidden">
				<TextBlock Text="{x:Static properties:Resources.MessageVersionOutdated}"/>
				<TextBlock>
					<Hyperlink Foreground="{StaticResource dialogTextColor}" NavigateUri="{Binding Source={x:Static properties:Resources.WebSiteDownloadUri}}">
						<Run Text="{x:Static properties:Resources.WebSiteDownloadUri}"/>
					</Hyperlink>
				</TextBlock>
			</StackPanel>
			<TextBlock Name="previewVersion" Text="{x:Static properties:Resources.MessageVersionPreview}" Visibility="Hidden"/>
			<Button Name="checkVersion" Content="{x:Static properties:Resources.TitleCheckVersion}" Click="CheckVersionButtonClick" HorizontalAlignment="Center" VerticalAlignment="Top"/>
		</Grid>

		<Button Grid.Row="5" Content="{x:Static properties:Resources.TitleOK}" IsDefault="True" IsCancel="True" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
	</Grid>
</Window>
